package agency.tango.materialintroscreen;

import ohos.app.Context;

/**
 * @ProjectName: material-intro-screen-master
 * @Package: agency.tango.materialintroscreen
 * @ClassName: SlideViewtBuilder
 * @Description: SlideViewtBuilder构造builder
 * @CreateDate: 2021/4/12 20:03
 * @UpdateDate: 2021/4/12 20:03
 * @UpdateRemark: 暂无
 * @Version: 1.0
 */
public class SlideViewBuilder {
    int backgroundColor;
    int buttonsColor;
    String title;
    String description;
    String[] neededPermissions;
    String[] possiblePermissions;
    int image;

    /**
     * 获取SlideComponet的背景颜色
     *
     * @return 背景颜色
     */
    public int getBackgroundColor() {
        return backgroundColor;
    }

    /**
     * 获取SlideComponet的按钮颜色
     *
     * @return 按钮颜色
     */
    public int getButtonsColor() {
        return buttonsColor;
    }

    /**
     * 获取SlideComponet的标题
     *
     * @return 标题
     */
    public String getTitle() {
        return title;
    }

    /**
     * 获取SlideComponet的描述
     *
     * @return 描述
     */
    public String getDescription() {
        return description;
    }

    /**
     * 获取SlideComponet的必要的权限
     *
     * @return 必要的权限
     */
    public String[] getNeededPermissions() {
        return neededPermissions;
    }

    /**
     * 获取SlideComponet的可能需要的权限
     *
     * @return 可能需要的权限
     */
    public String[] getPossiblePermissions() {
        return possiblePermissions;
    }

    /**
     * 获取SlideComponet的图片资源id
     *
     * @return 图片资源id
     */
    public int getImage() {
        return image;
    }

    /**
     * 设置SlideComponet的背景色
     *
     * @param backgroundColor 背景色
     * @return SlideViewBuilder
     */
    public SlideViewBuilder backgroundColor(int backgroundColor) {
        this.backgroundColor = backgroundColor;
        return this;
    }

    /**
     * 设置SlideComponet的按钮颜色
     *
     * @param buttonsColor 按钮颜色
     * @return SlideViewBuilder
     */
    public SlideViewBuilder buttonsColor(int buttonsColor) {
        this.buttonsColor = buttonsColor;
        return this;
    }

    /**
     * 设置SlideComponet的标题
     *
     * @param title 标题
     * @return SlideViewBuilder
     */
    public SlideViewBuilder title(String title) {
        this.title = title;
        return this;
    }

    /**
     * 设置SlideComponet的描述
     *
     * @param description 描述
     * @return SlideViewBuilder
     */
    public SlideViewBuilder description(String description) {
        this.description = description;
        return this;
    }

    /**
     * 设置SlideComponet的必要的权限
     *
     * @param neededPermissions 必要的权限
     * @return SlideViewBuilder
     */
    public SlideViewBuilder neededPermissions(String[] neededPermissions) {
        this.neededPermissions = neededPermissions;
        return this;
    }

    /**
     * 设置SlideComponet的可能需要的权限
     *
     * @param possiblePermissions 可能需要的权限
     * @return SlideViewBuilder
     */
    public SlideViewBuilder possiblePermissions(String[] possiblePermissions) {
        this.possiblePermissions = possiblePermissions;
        return this;
    }

    /**
     * 设置SlideComponet的图片
     *
     * @param image 图片
     * @return SlideViewBuilder
     */
    public SlideViewBuilder image(int image) {
        this.image = image;
        return this;
    }

    /**
     * 构造SlideComponet
     *
     * @param context 上下文
     * @return SlideComponentContainer
     */
    public SlideComponentContainer build(Context context) {
        return SlideComponentContainer.createInstance(this, context);
    }
}

